#pragma once
#include "adalog/LogAppender.h"
#include <string>

namespace adalog
{
    /**
     * @brief 将日志备份到其他服务器中
     */
    class BackupAppender : public LogAppender
    {
    public:
        BackupAppender(const std::string& address, int port);
        ~BackupAppender();

        void Append(const char* data, size_t len);
    private:
        int conn_fd_ = -1;
    }; 
} // namespace adalog